package com.bd.scm.dao.mapper.approval;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bd.scm.domain.dto.approval.*;
import com.bd.scm.domain.models.approval.BdKqApproveAnnotation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  知会Mapper 接口
 * </p>
 *
 * @author Mason
 * @since 2020-07-09
 */
public interface BdKqApproveAnnotationMapper extends BaseMapper<BdKqApproveAnnotation> {
    /**
     * 添加知会人.
     * @param billIds
     * @param billType
     * @param operatorId
     * @param notifyIdList
     */
    void addNotify(@Param("billIds") String billIds,
                   @Param("billType") Integer billType,
                   @Param("operatorId") String operatorId,
                   @Param("notifyIdList") String notifyIdList);

    /**
     * 根据条件获取知会信息.
     *
     * @param billId
     * @param billType
     * @param operatorId
     * @return
     */
    List<BdKqApproveAnnotationDataDto> getNotifyInfoById(@Param("billId") Integer billId,
                                                         @Param("billType") Integer billType,
                                                         @Param("operatorId") Integer operatorId);

    /**
     * 获取加班知会列表。
     * @param page
     * @param bdKqApproveAnnotationParamDto
     * @return
     */
    IPage<OvertimeAnnotationData> getOverTimeList(Page<OvertimeAnnotationData> page,
                                                  @Param("bdKqApproveAnnotationParamDto") BdKqApproveAnnotationParamDto bdKqApproveAnnotationParamDto);

    /**
     * 获取请假知会列表.
     * @param page
     * @param bdKqApproveAnnotationParamDto
     * @return
     */
    IPage<LeaveAnnotationData> getLeaveList(Page<LeaveAnnotationData> page,
                                            @Param("bdKqApproveAnnotationParamDto") BdKqApproveAnnotationParamDto bdKqApproveAnnotationParamDto);

    /**
     * 获取补出勤知会列表.
     * @param page
     * @param bdKqApproveAnnotationParamDto
     * @return
     */
    IPage<RepairAnnotationData> getRepairList(Page<RepairAnnotationData> page,
                                              @Param("bdKqApproveAnnotationParamDto") BdKqApproveAnnotationParamDto bdKqApproveAnnotationParamDto);

    /**
     * 被知会人填写备注.
     *
     * @param notifyRemarkParamsDto
     */
    void saveNotifyRemark(@Param("notifyRemarkParamsDto") NotifyRemarkParamsDto notifyRemarkParamsDto);
}
